package cn.yunlang.zhangZhongFei.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import lombok.Data;

/**
 * 公司表
 *
 * @author ·
 * @since 2025-05-26 14:50:46
 */
@Data
@TableName("t_goods")
@ApiModel(value = "商品对象", description = "商品表")
public class Goods implements Serializable {

  private static final long serialVersionUID = 1L;

  @ApiModelProperty(value = "id", hidden = true)
  @TableId(value = "id", type = IdType.AUTO)
  private Long id;

  @ApiModelProperty("发布用户id")
  @TableField("publisher_id")
  private Long publisherId;

  @ApiModelProperty("商品名称")
  @TableField("goods_name")
  private String goodsName;

  @ApiModelProperty("首页商品图")
  @TableField("goods_avatar")
  private String goodsAvatar;

  @ApiModelProperty("收藏量")
  @TableField("like_count")
  private Integer likeCount;

  @ApiModelProperty("浏览量")
  @TableField("view_count")
  private Integer viewCount;

  @ApiModelProperty("负责人")
  @TableField("director")
  private String director;

  @ApiModelProperty("公司名称")
  @TableField("company_name")
  private String companyName;

  @ApiModelProperty("电话微信")
  @TableField("wechat_phone")
  private String wechatPhone;

  @ApiModelProperty("公司地址")
  @TableField("address")
  private String address;

  @ApiModelProperty("简介")
  @TableField("info")
  private String info;

  @ApiModelProperty("主题宣传码json")
  @TableField("publicize_json")
  private String publicizeJson;

  @ApiModelProperty("图片链接json")
  @TableField("picture_json")
  private String pictureJson;

  @ApiModelProperty("附件链接json")
  @TableField("file_json")
  private String fileJson;

  @ApiModelProperty("特殊附加json")
  @TableField("spec_file_json")
  private String specFileJson;

  @ApiModelProperty("是否热门(0=否，1=是)")
  @TableField("is_hot")
  private String isHot;

  @ApiModelProperty(value = "是否删除(0=否，1=是)", hidden = true)
  @TableField("is_delete")
  @TableLogic
  private String isDelete;

  @ApiModelProperty("创建时间")
  @TableField(value = "create_time", fill = FieldFill.INSERT)
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private Date createTime;

  @ApiModelProperty(value = "修改时间", hidden = true)
  @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private Date updateTime;

  // -----------------------------------//

  @ApiModelProperty("是否点赞")
  @TableField(exist = false)
  private Boolean isLike;

  @ApiModelProperty("是否收藏")
  @TableField(exist = false)
  private Boolean isCollect;

  @ApiModelProperty("评论列表")
  @TableField(exist = false)
  private List<Comment> commentList;
}
